package com.soft.service;

import java.util.List;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.util.Assert;

import com.soft.entity.Xuesheng;

@SpringBootTest
public class XueshengServiceTest {
	@Autowired
	private XueshengService xueshengService;
	//@Test
	public void queryByBanjiNameTest() {
		List<Xuesheng> xueshengList = xueshengService.queryByBanjiName("李红");
		Assert.isTrue(xueshengList.size()==2, "查询错误");
	}
	  //@Test
	    public void insertXueshengTest() {
	        // 给经营部添加一名员工
	        int num = xueshengService.insertXuesheng("小红", "广州", "李红");
	        Assert.isTrue(num == 1, "增加学生错误");
	    }
	    @Test
	    public void updateXueshengTest() {
	        // 给经营部添加一名员工
	        int num = xueshengService.updateXuesheng("小明", "广州", "张三");
	        Assert.isTrue(num == 1, "修改学生错误");
	    }

}
